Process Platform Preferences Plug-in |
The cordys.preferences plug-in is used to retrieve the language, locale, and timezone values according to the user preferences. It uses the cordys.ajax plug-in to invoke the service.
Method
The following method is supported by the cordys.preferences plug-in:
Method | Description |
---|---|
getUserPreferences() | This method returns a jQuery deferred, which provides the details of the preferences according to the current user. It returns the preferences object with the following properties.
Refer to the example below. |
Example
The following is the sample code snippet:
Get User Preferences
$.cordys.preferences.getUserPreferences().done(function(preferences) { var langauge = preferences.language; var locale = preferences.locale; var timezone = preferences.timezone; });